package com.activiti;

import org.activiti.engine.ProcessEngine;
import org.activiti.engine.ProcessEngines;
import org.activiti.engine.RepositoryService;
import org.activiti.engine.repository.Deployment;

public class ActivitiApplication {
    public static void main(String[] args) {
        // 建表
        // DbSchemaCreate.main(args);
        ProcessEngine engine = ProcessEngines.getDefaultProcessEngine();
        System.out.println(engine);

        // 测试流程部署
        //资源管理类
        RepositoryService repositoryService = engine.getRepositoryService();
        Deployment deploy = repositoryService.createDeployment()
                .name("出差申请")
                .addClasspathResource("bpmn/evection.bpmn20.xml")
                .addClasspathResource("bpmn/evection.png")
                .deploy();

        System.out.println("流程部署Id=" + deploy.getId());
        System.out.println("流程部署名字=" + deploy.getName());
    }
}
